package com.kmxd.ams.core.common.constant;

/**
 * 常量类
 *
 * @author admin
 */
public class Constants {

  /** sa token, token session, user key */
  public static final String LOGIN_USER_KEY = "user";

  /** 所有权限常量 */
  public static final String ALL_PERMISSION = "*:*:*";

  /** 超级管理员组 */
  public static final String ROOT_GROUP = "root";

  public static final String REQ_ORIGIN_DATA_CLIENT_IP = "clientIP";

  /** 请求头中对应端应用放置端标识的 Key */
  public static final String HEADER_FIELD_CHANNEL = "S-Channel";

  /** 设备 ID 使用场景，如：请求验证码(token认证模式)时候需要的客户端标识 */
  public static final String HEADER_FIELD_DEVICE_ID = "S-DeviceID";

  public static final String VO_FIELD_CHANNEL = "channel";
  public static final String VO_FIELD_SYS_CHANNEL = "sysChannel";

  public static final String COMM_PARAMS_FIELD_BIZ_CODE = "bizCode";

  /** 渠道 */
  public static final String CHANNEL_WEB = "ams_web";

  public static final String CHANNEL_MOBILE_IOS = "ams_ios";
  public static final String CHANNEL_MOBILE_ANDROID = "ams_android";
  public static final String CHANNEL_MOBILE_H5 = "ams_h5";
  public static final String CHANNEL_MINI = "ams_mini";

  /** 电子表格文件名 */
  public static final String TABLE_NAME_EFILE = "i_efile_record";

  /** 结果 */
  public static final String RESP_OK_CODE = "1";

  public static final String RESP_FAIL_CODE = "-1";

  /** 多语言，默认语言配置信息 */
  public static final String DEFAULT_LANG_CODE = "zh_cn";

  public static final String DEFAULT_LANG_CONTENT = "系统提示！";

  /** 默认单位ID */
  public static final long DEFAULT_CROP_ID = 10000L;

  /** 档案类型，字典code */
  public static final String DICT_ARCHIVE_OBJECT = "archive_dict_objectType";

  /** 树结构，默认最顶级节点pid */
  public static final String DEFAULT_TOP_TREE_PID = "0";

  /** 查询条件为空的占位符字段 */
  public static final String QUERY_NULL_DATA_PLACEHOLDER = "-1";

  /** 特殊字段，表名 */
  public static final String DB_TABLE_ID = "table_id";

  public static final String TABLE_ID = "tableId";

  /** 新复制的文件，文件名拼接符 */
  public static final String COPY_FILE_FILE_NAME_JOINER = "-from-";

  /** 复制前缀 */
  public static final String COPY_PREFIX = "(复制)";

  /** 默认年度版本 */
  public static final Integer DEF_VERSION = 1000;
  /** 默认版本名称 */
  public static final String DEF_VERSION_NAME = "默认版本";

  public static final String DB_FUNC_MAX = "max";
  public static final String DB_FUNC_MIN = "min";

  /** 默认状态值 */
  public static final Long DEF_STATUS = 0L;

  /** 数值型字段最多个数 */
  public static final Integer EXT_INT_MAX = 5;
  /** 日期型字段最多个数 */
  public static final Integer EXT_DATE_MAX = 5;
  /** 字符串型字段最多个数 */
  public static final Integer EXT_STRING_MAX = 10;

  /** 数值型字段 */
  public static final String EXT_INT_KEY = "bigint";
  /** 数值型字段年度 */
  public static final String EXT_INT_KEY_YEAR = "bigintYear";
  /** 日期型字段 */
  public static final String EXT_DATE_KEY = "datetime";
  /** 字符串型字段 */
  public static final String EXT_STRING_KEY = "varchar";
  /** 字符串型字段-长文本 */
  public static final String EXT_STRING_KEY_LONG = "longtext";

  /** 快速数据校验service前缀 */
  public static final String CHECK_DATA_SVC_PREFIX = "data_check_";

  public static final Integer FIRST_PAGE = 1;
  public static final Integer DEF_BATCH_PAGE_SIZE = 1000;
  public static final Integer DEF_BATCH_SAVE_SIZE = 500;

  public static final String TRANCE_ID = "tl";

  /** 回收站特殊标识 */
  public static final Integer TRASH_KEY = -99;

  /** 报表公共部分默认ID */
  public static final Long REPORT_COMMON_ID = 1000000000000000099L;

  /** 检索服务前缀 */
  public static final String SEARCH_SVC_PREFIX = "search_svc_";

  /** 判断是否是手动输入 */
  public static final String EDIT_FIELD_INPUT = ":(inputValue)";

  /** 支持的时间格式集合 */
  public static final String[] parsePatterns = {
    "yyyy-MM-dd",
    "yyyy-MM-dd HH:mm",
    "yyyy-MM-dd HH:mm:ss",
    "yyyy/MM/dd",
    "yyyy/MM/dd HH:mm",
    "yyyy/MM/dd HH:mm:ss",
    "yyyy.MM.dd",
    "yyyy.MM.dd HH:mm:ss",
    "yyyy.MM.dd HH:mm",
    "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
    "yyyy-MM-dd HH:mm:ss.S",
    "yyyy-MM-dd HH:mm:ss.SS",
    "yyyy-MM-dd HH:mm:ss.SSS",
    "yyyy-MM-dd'T'HH:mm:ss",
    "yyyy-MM-dd'T'HH:mm",
    "yyyy-MM-dd'T'",
    "yyyy-MM",
    "yyyy.MM",
    "yyyy/MM",
    "yyyyMMdd",
    "yyyyMM",
    "yyyy"
  };

  /** ocr service前缀 */
  public static final String OCR_SVC_PREFIX = "ocr_svc_";

  public static final String DEFAULT_OCR_TYPE = "tess4j";

  public static final String WATERMARK_SVC_PREFIX = "watermark_svc_";

  public static final String OA_FINISH_SVC_PREFIX = "oa_finish_svc_";

  public static final String ES_HIGHLIGHT_PRE_TAG = "<span class=\"highlight\">";
  public static final String ES_HIGHLIGHT_POST_TAG = "</span>";
  /** 目录占位符 */
  public static final String CATALOG_PLACEHOLDER = "--";

  /** 库房盘点类型 */
  public static final String DICT_STOCK_TAKE_TYPE = "stock_take_type";

  public static final Integer CATALOG_DEFAULT_STATUS = 999;
  public static final Integer CATALOG_FRONT_STATUS = 998;

  public static final String CATALOG_DATA_CONDITION_FIELD = "dataCondition";
  public static final String CATALOG_group_CONDITION_FIELD = "groupCondition";
  public static final String CATALOG_TYPE_FIELD = "type";
  public static final String CATALOG_TYPE_MODEL_FIELD = "typeModel";

  public static final String CATALOG_ARCH_INFO_FIELD = "archInfo";
  public static final String CATALOG_KEY_FIELD = "key";

  /** 移交新增路径前缀 */
  public static final String TRANSFER_PATH = "/transfer";

  public static final String DATA_FIELD = "data";
  public static final String VALUE_FIELD = "value";
  public static final String NAME_FIELD = "name";

  public static final String DEF_USE_DAY = "7";

  /** 文件转换，不支持的文件类型 */
  public static final String CONVERT_TYPE_UNSUPPORT = "不支持的格式";

  /** web socket服务前缀 */
  public static final String WS_SVC_PREFIX = "ws_svc_";

  /** 默认web socket服务 netty-socket */
  public static final String DEFAULT_WS_TYPE = "socketio";
}
